From c065aaf991673d2ed08f099f691f6b08af5b071e Mon Sep 17 00:00:00 2001 From: robertl Date: Sat, 16 Oct 2004 20:14:52 +0000 Subject: [PATCH] Ooops. Fix the build so that mingw build overrides the INHIBIT_USB from the parent. Improve error when build w/o USB. git-svn-id: http://gpsbabel.googlecode.com/svn/trunk@957 f51c46e8-681c-474f-0cfe-069cfd0219fb --- gpsbabel/Makefile | 4 ++-- gpsbabel/jeeps/gpsusbstub.c | 9 +++++---- gpsbabel/mingw/Makefile | 6 +++++- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/gpsbabel/Makefile b/gpsbabel/Makefile index 5e2771849..1151f80c8 100644 --- a/gpsbabel/Makefile +++ b/gpsbabel/Makefile @@ -88,8 +88,8 @@ dep: (echo -n "internal_styles.c: mkstyle.sh " ; echo style/*.style ; /bin/echo -e '\t./mkstyle.sh > internal_styles.c || (rm -f internal_styles.c ; exit 1)' ) >> /tmp/dep echo Edit Makefile and bring in /tmp/dep -VERSIONU=1_2_4_beta10132004 -VERSIOND=1.2.4_beta10132004 +VERSIONU=1_2_4_beta10162004 +VERSIOND=1.2.4_beta10162004 #VERSIONU=1_2_3 #VERSIOND=1.2.3 diff --git a/gpsbabel/jeeps/gpsusbstub.c b/gpsbabel/jeeps/gpsusbstub.c index b23cacd01..04659c3ee 100644 --- a/gpsbabel/jeeps/gpsusbstub.c +++ b/gpsbabel/jeeps/gpsusbstub.c @@ -23,28 +23,29 @@ #include "garminusb.h" +const char no_usb[] = "USB suport is not available in this build.\n"; int gusb_cmd_send(const garmin_usb_packet *obuf, size_t sz) { - fatal("USB support is not available"); + fatal(no_usb); } int gusb_cmd_get(garmin_usb_packet *ibuf, size_t sz) { - abort(); + fatal(no_usb); } int gusb_open(const char *portname) { - abort(); + fatal(no_usb); } int gusb_init() { - abort(); + fatal(no_usb); } int diff --git a/gpsbabel/mingw/Makefile b/gpsbabel/mingw/Makefile index 9f5f8e518..f5833cb7d 100644 --- a/gpsbabel/mingw/Makefile +++ b/gpsbabel/mingw/Makefile @@ -7,7 +7,11 @@ gpsbabel.exe: wintesto.cmd include ../Makefile CFLAGS=-Iinclude -I../coldsync -O $(INHIBIT_USB) -# INHIBIT_USB=-DNO_USB +# +# Must define empty (don't comment out the whole line) if you want to +# override INHIBIT_USB from the parent Makefile. +# +INHIBIT_USB=#-DNO_USB OSJEEPS=jeeps/gpsusbwin.o gpsbabel.exe: $(OBJS) -- 2.30.2